package com.ziyun.erp.modules.service.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.ziyun.erp.common.e.service.ServiceReceiveStatusEnum;
import com.ziyun.erp.common.e.service.ServiceSendStatusEnum;
import com.ziyun.erp.common.e.service.ServiceStatusEnum;
import com.ziyun.erp.common.e.service.ServiceTypeEnum;
import com.ziyun.erp.common.utils.EnumUtil;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 售后登记表
 *
 * @author zh
 * @email 296588519@qq.com
 * @date 2018-08-22 15:34:38
 */
@TableName("erp_service_register")
public class ServiceRegisterEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 自增id
     */
    @TableId
    private Integer srId;
    /**
     * 售后订单编号
     */
    private String srCode;
    /**
     * 客户网名
     */
    @NotEmpty(message = "客户网名不能为空")
    private String srName;
    /**
     * 销售订单号
     */
    @NotEmpty(message = "销售单号不能为空")
    private String srOrderId;
    /**
     * 配送单号
     */
    private String srOrderSend;
    /**
     * 售后类型:1.仅退款2.退货退款3.换货4.补发
     */
    @NotNull(message = "售后类型不能为空")
    private Integer srType;
    /**
     * 售后订单状态:1.待审核2.已审核3.已收货4.已退款5.已转生产6.已发货7.客户已收货8.售后完成9.订单关闭
     */
    private Integer srStatus;
    /**
     * 收货状态:1.待收货2.待检测3.待入库4.已入库
     */
    private Integer srReceiveStatus;
    /**
     * 发货状态:1.待生产2.待发货3.已发货4.已收货
     */
    private Integer srSendStatus;
    /**
     * 售后原因
     */
    private String srReason;

    /*其它原因*/
    private String srOtherReason;
    /**
     * 转销售订单号
     */
    private String srShiftOrder;
    /**
     * 收件人姓名
     */
    private String srReceiveName;
    /**
     * 收件人电话
     */
    private String srReceiveMobile;
    /**
     * 收件人所在省份
     */
    private String srReceiveProvice;
    /**
     * 收件人所在州市
     */
    private String srReceiveCity;
    /**
     * 收件人所在区/县
     */
    private String srReceiveArea;
    /**
     * 收件人所在详细地址
     */
    private String srReceiveAddress;
    /**
     * 收件地区编码
     */
    private Integer srReceiveAreacode;
    /**
     * 收货邮单号
     */
    private String srReceivePostalCode;
    /**
     * 签收时间
     */
    private Date srSignTime;
    /**
     * 签收人
     */
    private String srSignName;

    @TableField(exist = false)
    private String srCreateNameStr;
    /**
     * 发货方式
     */
    private Integer srSendType;
    /**
     * 发货时间
     */
    private Date srSendTime;
    /**
     * 收款时间
     */
    private Date srReceiptTime;
    /**
     * 退款时间
     */
    private Date srRefundTime;
    /**
     * 检测人（员工id）
     */
    private String srCheckName;
    /**
     * 检测时间
     */
    private Date srCheckTime;
    /**
     * 售后完成时间
     */
    private Date srFinishTime;
    /**
     * 备注
     */
    private String srRemark;
    /**
     * 伪删除标记（0正常 1删除）
     */
    private Integer srDel;
    /**
     * 更新人（员工id）
     */
    private String srUpdateName;

    @TableField(exist = false)
    private String srUpdateNameStr;
    /**
     * 更新时间
     */
    private Date srUpdateTime;
    /**
     * 创建人（员工id）
     */
    private String srCreateName;
    /**
     * 创建时间
     */
    private Date srCreateTime;


    /*运费形式 1无 2紫云网 3商家 4用户 5AA*/
    private Integer srFreightForm;

    /*运费金额*/
    private BigDecimal srFreightAmount;

    /*退货仓库*/
    private Integer srReturnStockId;

    /*售后责任*/
    private String srResponsibility;


    /**
     * 设置：自增id
     */
    public void setSrId(Integer srId) {
        this.srId = srId;
    }

    /**
     * 获取：自增id
     */
    public Integer getSrId() {
        return srId;
    }

    /**
     * 设置：售后订单编号
     */
    public void setSrCode(String srCode) {
        this.srCode = srCode;
    }

    /**
     * 获取：售后订单编号
     */
    public String getSrCode() {
        return srCode;
    }

    /**
     * 设置：客户网名
     */
    public void setSrName(String srName) {
        this.srName = srName;
    }

    /**
     * 获取：客户网名
     */
    public String getSrName() {
        return srName;
    }

    /**
     * 设置：销售订单号
     */
    public void setSrOrderId(String srOrderId) {
        this.srOrderId = srOrderId;
    }

    /**
     * 获取：销售订单号
     */
    public String getSrOrderId() {
        return srOrderId;
    }

    /**
     * 设置：配送单号
     */
    public void setSrOrderSend(String srOrderSend) {
        this.srOrderSend = srOrderSend;
    }

    /**
     * 获取：配送单号
     */
    public String getSrOrderSend() {
        return srOrderSend;
    }

    /**
     * 设置：售后类型:1.仅退款2.退货退款3.换货4.补发
     */
    public void setSrType(Integer srType) {
        this.srType = srType;
    }

    /**
     * 获取：售后类型:1.仅退款2.退货退款3.换货4.补发
     */
    public Integer getSrType() {
        return srType;
    }

    public String getSrTypeText() {
        if(srType != null){
            return EnumUtil.getEnumByCodeInt(ServiceTypeEnum.class, srType).toDescribe();
        }else
            return null;
    }

    /**
     * 设置：售后订单状态:1.待审核2.已审核3.已收货4.已退款5.已转生产6.已发货7.客户已收货8.售后完成9.订单关闭
     */
    public void setSrStatus(Integer srStatus) {
        this.srStatus = srStatus;
    }

    /**
     * 获取：售后订单状态:1.待审核2.已审核3.已收货4.已退款5.已转生产6.已发货7.客户已收货8.售后完成9.订单关闭
     */
    public Integer getSrStatus() {
        return srStatus;
    }

    public String getSrStatusText() {
        if(this.srStatus !=null){
            return EnumUtil.getEnumByCodeInt(ServiceStatusEnum.class, srStatus).toDescribe();
        }else
            return null;
    }

    /**
     * 设置：收货状态:1.待收货2.待检测3.待入库4.已入库
     */
    public void setSrReceiveStatus(Integer srReceiveStatus) {
        this.srReceiveStatus = srReceiveStatus;
    }

    /**
     * 获取：收货状态:1.待收货2.待检测3.待入库4.已入库
     */
    public Integer getSrReceiveStatus() {
        return srReceiveStatus;
    }

    public String getSrReceiveStatusText() {
        if (this.srReceiveStatus != null && this.srReceiveStatus != 0) {
            return EnumUtil.getEnumByCodeInt(ServiceReceiveStatusEnum.class, srReceiveStatus).toDescribe();
        } else
            return "--";
    }

    /**
     * 设置：发货状态:1.待生产2.待发货3.已发货4.已收货
     */
    public void setSrSendStatus(Integer srSendStatus) {
        this.srSendStatus = srSendStatus;
    }

    /**
     * 获取：发货状态:1.待生产2.待发货3.已发货4.已收货
     */
    public Integer getSrSendStatus() {
        return srSendStatus;
    }

    public String getSrSendStatusText() {
        if (this.srSendStatus != null && this.srSendStatus != 0) {
            return EnumUtil.getEnumByCodeInt(ServiceSendStatusEnum.class, srSendStatus).toDescribe();
        } else
            return "--";
    }

    /**
     * 设置：售后原因
     */
    public void setSrReason(String srReason) {
        this.srReason = srReason;
    }

    /**
     * 获取：售后原因
     */
    public String getSrReason() {
        return  srReason;
    }

    /**
     * 设置：转销售订单号
     */
    public void setSrShiftOrder(String srShiftOrder) {
        this.srShiftOrder = srShiftOrder;
    }

    /**
     * 获取：转销售订单号
     */
    public String getSrShiftOrder() {
        return srShiftOrder;
    }

    /**
     * 设置：收件人姓名
     */
    public void setSrReceiveName(String srReceiveName) {
        this.srReceiveName = srReceiveName;
    }

    /**
     * 获取：收件人姓名
     */
    public String getSrReceiveName() {
        return srReceiveName;
    }

    /**
     * 设置：收件人电话
     */
    public void setSrReceiveMobile(String srReceiveMobile) {
        this.srReceiveMobile = srReceiveMobile;
    }

    /**
     * 获取：收件人电话
     */
    public String getSrReceiveMobile() {
        return srReceiveMobile;
    }

    /**
     * 设置：收件人所在省份
     */
    public void setSrReceiveProvice(String srReceiveProvice) {
        this.srReceiveProvice = srReceiveProvice;
    }

    /**
     * 获取：收件人所在省份
     */
    public String getSrReceiveProvice() {
        return srReceiveProvice;
    }

    /**
     * 设置：收件人所在州市
     */
    public void setSrReceiveCity(String srReceiveCity) {
        this.srReceiveCity = srReceiveCity;
    }

    /**
     * 获取：收件人所在州市
     */
    public String getSrReceiveCity() {
        return srReceiveCity;
    }

    /**
     * 设置：收件人所在区/县
     */
    public void setSrReceiveArea(String srReceiveArea) {
        this.srReceiveArea = srReceiveArea;
    }

    /**
     * 获取：收件人所在区/县
     */
    public String getSrReceiveArea() {
        return srReceiveArea;
    }

    /**
     * 设置：收件人所在详细地址
     */
    public void setSrReceiveAddress(String srReceiveAddress) {
        this.srReceiveAddress = srReceiveAddress;
    }

    /**
     * 获取：收件人所在详细地址
     */
    public String getSrReceiveAddress() {
        return srReceiveAddress;
    }

    /**
     * 设置：收件地区编码
     */
    public void setSrReceiveAreacode(Integer srReceiveAreacode) {
        this.srReceiveAreacode = srReceiveAreacode;
    }

    /**
     * 获取：收件地区编码
     */
    public Integer getSrReceiveAreacode() {
        return srReceiveAreacode;
    }

    /**
     * 设置：收货邮单号
     */
    public void setSrReceivePostalCode(String srReceivePostalCode) {
        this.srReceivePostalCode = srReceivePostalCode;
    }

    /**
     * 获取：收货邮单号
     */
    public String getSrReceivePostalCode() {
        return srReceivePostalCode;
    }

    /**
     * 设置：签收时间
     */
    public void setSrSignTime(Date srSignTime) {
        this.srSignTime = srSignTime;
    }

    /**
     * 获取：签收时间
     */
    public Date getSrSignTime() {
        return srSignTime;
    }

    /**
     * 设置：签收人
     */
    public void setSrSignName(String srSignName) {
        this.srSignName = srSignName;
    }

    /**
     * 获取：签收人
     */
    public String getSrSignName() {
        return srSignName;
    }

    /**
     * 设置：发货方式
     */
    public void setSrSendType(Integer srSendType) {
        this.srSendType = srSendType;
    }

    /**
     * 获取：发货方式
     */
    public Integer getSrSendType() {
        return srSendType;
    }

    /**
     * 设置：发货时间
     */
    public void setSrSendTime(Date srSendTime) {
        this.srSendTime = srSendTime;
    }

    /**
     * 获取：发货时间
     */
    public Date getSrSendTime() {
        return srSendTime;
    }

    /**
     * 设置：收款时间
     */
    public void setSrReceiptTime(Date srReceiptTime) {
        this.srReceiptTime = srReceiptTime;
    }

    /**
     * 获取：收款时间
     */
    public Date getSrReceiptTime() {
        return srReceiptTime;
    }

    /**
     * 设置：退款时间
     */
    public void setSrRefundTime(Date srRefundTime) {
        this.srRefundTime = srRefundTime;
    }

    /**
     * 获取：退款时间
     */
    public Date getSrRefundTime() {
        return srRefundTime;
    }

    /**
     * 设置：检测人（员工id）
     */
    public void setSrCheckName(String srCheckName) {
        this.srCheckName = srCheckName;
    }

    /**
     * 获取：检测人（员工id）
     */
    public String getSrCheckName() {
        return srCheckName;
    }

    /**
     * 设置：检测时间
     */
    public void setSrCheckTime(Date srCheckTime) {
        this.srCheckTime = srCheckTime;
    }

    /**
     * 获取：检测时间
     */
    public Date getSrCheckTime() {
        return srCheckTime;
    }

    /**
     * 设置：售后完成时间
     */
    public void setSrFinishTime(Date srFinishTime) {
        this.srFinishTime = srFinishTime;
    }

    /**
     * 获取：售后完成时间
     */
    public Date getSrFinishTime() {
        return srFinishTime;
    }

    /**
     * 设置：备注
     */
    public void setSrRemark(String srRemark) {
        this.srRemark = srRemark;
    }

    /**
     * 获取：备注
     */
    public String getSrRemark() {
        return srRemark;
    }

    /**
     * 设置：伪删除标记（0正常 1删除）
     */
    public void setSrDel(Integer srDel) {
        this.srDel = srDel;
    }

    /**
     * 获取：伪删除标记（0正常 1删除）
     */
    public Integer getSrDel() {
        return srDel;
    }

    /**
     * 设置：更新人（员工id）
     */
    public void setSrUpdateName(String srUpdateName) {
        this.srUpdateName = srUpdateName;
    }

    /**
     * 获取：更新人（员工id）
     */
    public String getSrUpdateName() {
        return srUpdateName;
    }

    /**
     * 设置：更新时间
     */
    public void setSrUpdateTime(Date srUpdateTime) {
        this.srUpdateTime = srUpdateTime;
    }

    /**
     * 获取：更新时间
     */
    public Date getSrUpdateTime() {
        return srUpdateTime;
    }

    /**
     * 设置：创建人（员工id）
     */
    public void setSrCreateName(String srCreateName) {
        this.srCreateName = srCreateName;
    }

    /**
     * 获取：创建人（员工id）
     */
    public String getSrCreateName() {
        return srCreateName;
    }

    /**
     * 设置：创建时间
     */
    public void setSrCreateTime(Date srCreateTime) {
        this.srCreateTime = srCreateTime;
    }

    /**
     * 获取：创建时间
     */
    public Date getSrCreateTime() {
        return srCreateTime;
    }



    public String getSrOtherReason() {
        return srOtherReason;
    }

    public void setSrOtherReason(String srOtherReason) {
        this.srOtherReason = srOtherReason;
    }

    public Integer getSrFreightForm() {
        return srFreightForm;
    }

    public void setSrFreightForm(Integer srFreightForm) {
        this.srFreightForm = srFreightForm;
    }

    public BigDecimal getSrFreightAmount() {
        return srFreightAmount;
    }

    public void setSrFreightAmount(BigDecimal srFreightAmount) {
        this.srFreightAmount = srFreightAmount;
    }

    public Integer getSrReturnStockId() {
        return srReturnStockId;
    }

    public void setSrReturnStockId(Integer srReturnStockId) {
        this.srReturnStockId = srReturnStockId;
    }

    public String getSrResponsibility() {
        return srResponsibility;
    }

    public void setSrResponsibility(String srResponsibility) {
        this.srResponsibility = srResponsibility;
    }

    public String getSrCreateNameStr() {
        return srCreateNameStr;
    }

    public void setSrCreateNameStr(String srCreateNameStr) {
        this.srCreateNameStr = srCreateNameStr;
    }

    public String getSrUpdateNameStr() {
        return srUpdateNameStr;
    }

    public void setSrUpdateNameStr(String srUpdateNameStr) {
        this.srUpdateNameStr = srUpdateNameStr;
    }
}
